<!DOCTYPE HTML>
<html>
<head>
<?php include '../util/Constant.php';?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php Constant::TITOLO_PAGINA_AMMINISTRAZIONE ?></title>
</head>
<?php
	if(!isset($_COOKIE[Constant::NOME_COKIE]))
	{
		header("Location: ../index.php");
	}
?>
<body>
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
		<?php if(isset($_POST["InsTema"])){ ?>
			<?php header("Location: gestionetemi/inserimentotema.php");?>
		<?php } else if(isset($_POST["ModTema"])){ ?>
			<?php header("Location: gestionetemi/inserimentotema.php");?>
		<?php }?>
		<input type="submit" id="InsTema" name="InsTema" value="Inserisci un tema">
		<input type="submit" id="ModTema" name="ModTema" value="Visualizza e modifica un tema">
		<?php 
		/*
		//echo "M0 -";
			$username = $_COOKIE[Constant::NOME_COKIE];
			if(isset($username))
			{
				//echo "M1 -";
				//echo "M2 -";
				include '../database/SqlManager.php';
				//echo "M3 -";
				$sqlMan = new SqlManager();
				//echo "M4 -";
				if($sqlMan->isAdmin($username)){
					//echo "M5 -";
					?><?php 
					//echo "Sei amministratore";
				}
			}
			//echo "M6 -";
			 */
		?>
	</form>
</body>
</html>
